Skip to content

feat: UniversalResolver v3 support - #3848

Merged
jxom merged 12 commits into
wevm:mainfrom
TateB:universal-resolver-v3
Aug 20, 2025
Merged

jxom merged 12 commits into
wevm:mainfrom
TateB:universal-resolver-v3

Conversation

@TateB

@TateB TateB commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

This PR uses ENSIP-23 for a stable UniversalResolver API, which is now the canonical entrypoint to ENS. The API, when used with the UniversalResolver proxy (0xeeeeeeee14d718c2b47d9923deab1335e144eeee) will allow clients to migrate automatically to ENSv2 on launch. For reverse resolution, the new API also enables ENSIP-19's chain-specific reverse resolution process by providing a coinType.

Changes:

  • Added evmChainIdToCoinType helper func
  • Added chainId and coinType param to getEnsName() for L2 reverse lookups
  • Added chainId param to getEnsAddress() for parity
  • Removed unused legacy UniversalResolver error handling
  • Removed unused ensRegistry on mainnet/holesky/sepolia
  • getEnsName now uses the local batch gateway by default

@changeset-bot

changeset-bot Bot commented Aug 8, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d6b88f4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread src/utils/ens/evmChainIdToCoinType.ts
@shrugs

shrugs commented Aug 14, 2025

Copy link
Copy Markdown

There might also be an issue with defaulting to eth mainnet's coinType if no coinType is provided — this 'eth mainnet as default' is explicitly deprecated in ENSIP-19 https://docs.ens.domains/ensip/19/#deprecating-mainnet-as-default which tells me that the api surface for reverse resolution requires a coinType (or a chainId from which to derive one). i.e. it's the consumer's responsibility to provide a specific coinType context within which to perform reverse resolution

@TateB

TateB commented Aug 14, 2025

Copy link
Copy Markdown
Contributor Author

which tells me that the api surface for reverse resolution requires a coinType (or a chainId from which to derive one). i.e. it's the consumer's responsibility to provide a specific coinType context within which to perform reverse resolution

that’s correct, but we’re also trying to get the latest universal resolver out to as many consumers as possible to allow for a smooth transition to ENSv2.

requiring coinType then turns these changes into breaking changes for the viem API, and it’d probably be better to rip the bandaid off in a breaking change after this migration, to prevent dissuading consumers from updating viem.

@jxom

jxom commented Aug 16, 2025

Copy link
Copy Markdown
Member

Just need to deploy contracts to these chains and update addresses:

@jxom
jxom merged commit 390fff8 into wevm:main Aug 20, 2025
2 of 3 checks passed
@tmm tmm mentioned this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants